const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
module.exports = {
    configureWebpack: {
        plugins: [
            // ...
            new CopyWebpackPlugin(
                [
                    {
                        from: 'node_modules/mavon-editor/dist/highlightjs/highlight.min.js',
                        to: path.resolve(__dirname, 'dist/markdown/highlightjs') // 插件将会把文件导出在dist/markdown/xxx
                    },
                    {
                        from: 'node_modules/mavon-editor/dist/markdown',
                        to: path.resolve(__dirname, 'dist/markdown/markdown')
                    },
                    {
                        from: 'node_modules/mavon-editor/dist/katex',
                        to: path.resolve(__dirname, 'dist/markdown/katex')
                    }
                ]
            )
            // ...
        ]
    },
    devServer: {
        disableHostCheck: true,
    }
};
